home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
pbc23c.arj
/
DWINMAN4.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
2KB
|
61 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB DXQPrint (BYVAL DSeg%, BYVAL DOfs%, St$, BYVAL Row%, BYVAL Column%, BYVAL VAttr%)
SUB DWindowMan4 (DSeg%, DOfs%, TopRow%, LeftCol%, BottomRow%, RightCol%, Frame%, VAttr%)
Y1% = TopRow%
X1% = LeftCol%
Y2% = BottomRow%
X2% = RightCol%
tmp% = X2% - X1% + 1
IF Frame% AND 1 THEN
TopSt$ = STRING$(tmp%, "─")
ELSE
TopSt$ = STRING$(tmp%, "═")
END IF
MidSt$ = SPACE$(tmp%)
BotSt$ = TopSt$
SELECT CASE Frame%
CASE 1
TopSt$ = "┌" + TopSt$ + "┐"
MidSt$ = "│" + MidSt$ + "│"
BotSt$ = "└" + BotSt$ + "┘"
CASE 2
TopSt$ = "╔" + TopSt$ + "╗"
MidSt$ = "║" + MidSt$ + "║"
BotSt$ = "╚" + BotSt$ + "╝"
CASE 3
TopSt$ = "╓" + TopSt$ + "╖"
MidSt$ = "║" + MidSt$ + "║"
BotSt$ = "╙" + BotSt$ + "╜"
CASE 4
TopSt$ = "╒" + TopSt$ + "╕"
MidSt$ = "│" + MidSt$ + "│"
BotSt$ = "╘" + BotSt$ + "╛"
CASE 5
TopSt$ = STRING$(tmp% + 2, "▄")
MidSt$ = "▌" + MidSt$ + "▐"
BotSt$ = STRING$(tmp% + 2, "▀")
CASE ELSE
TopSt$ = SPACE$(tmp% + 2)
MidSt$ = TopSt$
BotSt$ = TopSt$
END SELECT
Col% = X1% - 1
DXQPrint DSeg%, DOfs%, TopSt$, Y1%, Col%, VAttr%
FOR Row% = Y1% TO Y2%
DXQPrint DSeg%, DOfs%, MidSt$, Row%, Col%, VAttr%
NEXT
DXQPrint DSeg%, DOfs%, BotSt$, Y2% + 1, Col%, VAttr%
END SUB